﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 热水器
{
    class Alarm
    {
        public Alarm(Heater heater)
        {
            heater.alarmEvent += MakeAlert;
        }
        //发警报
        private void MakeAlert(int param)
        {
            Console.WriteLine("Alarm:嘀嘀嘀，水已经{0}度了", param);
        }
    }
}
